package com.yihu.cms.service;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;

import com.yihu.beans.CommodityStates;
import com.yihu.dataService.hessian.mongodb.interfaceService.CommodityStatesHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;

public class CommodityStatesService implements CommodityStatesHService {

	@Override
	public List<CommodityStates> getAllCommodityStates() {
		List<CommodityStates> result = new ArrayList<CommodityStates>();
		try {
			CommodityStatesHService cs = (CommodityStatesHService) ResourceMongoDBManager
					.getSingleton().getBeans("commodityStatesHSC");

			result = cs.getAllCommodityStates();
		} catch (MalformedURLException e) {
			System.out.println(e.toString());
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		
		return result;
	}

}
